*****************************************************************
***              ContextMenu AkelPad plugin v13.2             ***
*****************************************************************

2012   aka Instructor (Shengalts@mail.ru)


***  ***

       
, MDI ,    .

:
-          
   Ctrl       .
-        Win95.


***  ***

ContextMenu::Main
 .

ContextMenu::Show
  .


***  ***

:
  %f  
  %d   
  %a  AkelPad'
  %m   (handle)
  %i   
  %u URL  (   " ")
  %%  %
  % %

:
  # 
  ; 

  :
  SEPARATOR
      .
  EXPLORER
     .
  FAVOURITES
      .
  RECENTFILES
      .
  LANGUAGES
      .
  OPENCODEPAGES
        .
  SAVECODEPAGES
        .
  MDIDOCUMENTS
     MDI  (   " "   MDI).
  CLEAR
      (   " ").
  SET()
        (   ).   :
       1   ,    SDI.
       2   ,    MDI.
       4   ,    PMDI.
       8      ,    .
      16      .
  UNSET()
       . . SET()  .

  :
  [-]"[  ]" [Command() | Call() | +Call() | Exec() | OpenFile() | SaveFile() | Font() | Recode() | Insert() | Link() | Favourites() | Menu()] [Icon()]

  [-]"[  ]"
    "  "
        .
    -"  "
         ,     -    
      ( ,  ).
    ""
          ,     Command(),  
        ,     Command().

    Command()
      Command(4162)
              4162.     
             "  ...".
           : . AkelHelp-Rus.htm  AkelDLL.h    .
    Call("::", [ ])
      Call("Scripts::Main")
           Scripts   Main.
    +Call("::", [ ])
      +Call("LineBoard::Main")
           LineBoard   Main.     
         .
    Exec(" ", [" "])
      Exec("notepad.exe")
          .
      Exec(`notepad.exe`)
          .
      Exec('notepad.exe')
          .
      Exec('%windir%\notepad.exe')
          .
      Exec(`rundll32.exe shell32,ShellExec_RunDLL "%f"`, "%d")
                Windows.
    OpenFile("", [], [BOM])
      ""
          .
      
         .  -1   ,    .
      BOM
         BOM .  -1   ,    .
      OpenFile("C:\File.txt", 65001, -1)
             UTF-8.
    SaveFile("", [], [BOM])
      ""
             .
      
         .  -1   ,    .
      BOM
         BOM . 1 - , 0 - , -1    -   BOM.
      SaveFile("C:\File.txt", 65001, 0)
             UTF-8  BOM.
    Font("", , )
      ""
         , , "Courier".  ,  "".
       (  ):
        0  .
        1   .
        2   .
        3   .
        4    .
      
         .  ,  0.
      Font("Courier", 4, 10)
            Courier   10 pt.
    Recode(, )
      
         .  -1,    .
      
         .  -1,    .
      Recode(1251, 866)
             1251  866.
    Insert("", [Esc-])
      ""
         .
      Esc-:
        0  ""   Esc- ( ).
        1  ""  Esc-.   
            /  ,  :
           "\s" -       ;
           "\|" -       .
      Insert(" ")
             .
      Insert("<B>\s</B>", 1)
              .
      Insert("\[0031 0032 0033]", 1)
            "123".
    Link()
      Link(1)
            (   " ").
      Link(2)
           (   " ").
      Link(3)
           (   " ").
      Link(4)
           (   " ").
      Link(5)
               (   " ").
      Link(6)
           (   " ").
    Favourites()
      Favourites(1)
              ( ).
      Favourites(2)
              ( ).
      Favourites(3)
            .
      Favourites(4)
             .
    Menu(" ")
      " "
           " ContextMenu::Show".
      Menu("SYNTAXTHEME")
           "SYNTAXTHEME"  " ContextMenu::Show".

    Icon([""], [])
      Icon("Shell32.dll", 47)
            Shell32.dll   47.
      Icon("%a\AkelFiles\Plugs\Explorer.dll")
            Explorer.dll   0.
      Icon("%a\AkelFiles\Plugs\Toolbar\MyIcon.ico")
            MyIcon.ico.
      Icon(12)
            ContextMenu.dll   12.

:
  " " Command(4182)
  "" Command(4182)
  " " Call("Format::LineSortStrAsc")
  -" " Call("Scripts::Main", 1, "SpellCheck.js", "")
  " " +Call("Coder::Highlight")
  " " Exec("regedit.exe") Icon("regedit.exe")

 :
  "[ ]" [Index() | Break() | Icon()]
  {
  }

  "[ ]"
    " "
       .

    Index()
      Index(-1)
               ,    ,       .
    Break()
      Break(-1)
        ,   Index(),        .
    Icon([""], [])
      Icon(0)
        .     .  Icon()      .

:
  "&" Index(-1)
  {
    "  Windows-1251	Alt+W" Command(4122)
    "  DOS-866	Alt+D" Command(4123)
    "  8- 	Alt+K" Command(4124)
    "  UTF-16LE ()	Alt+L" Command(4125)
    "  UTF-16BE	Alt+B" Command(4126)
    "  UTF-8	Alt+U" Command(4127)
    SEPARATOR
    "& " Icon("%a\AkelFiles\Plugs\ToolBar.dll", 36)
    {
      OPENCODEPAGES
    }
    SEPARATOR
    "  Windows-1251	Shift+Alt+W" Command(4131)
    "  DOS-866	Shift+Alt+D" Command(4132)
    "  8-	Shift+Alt+K" Command(4133)
    "  UTF-16LE ()	Shift+Alt+L" Command(4134)
    "  UTF-16BE	Shift+Alt+B" Command(4135)
    "  UTF-8	Shift+Alt+U" Command(4136)
    "  UTF-8 (& BOM)" Command(4137)
    SEPARATOR
    "& " Icon("%a\AkelFiles\Plugs\ToolBar.dll", 5)
    {
      SAVECODEPAGES
    }
    SEPARATOR
    " 	Alt+F5" Command(4121)
  }


***   ContextMenu::Main ***

Call("ContextMenu::Main", 1, INDEX, "STRING")
  :
    1
          .
    INDEX
         (  0).
    STRING
          (  "").

Call("ContextMenu::Main", 10)
  :
    10
      /   .


***   ContextMenu::Show ***

Call("ContextMenu::Show", 1, "X", "Y", INDEX, "SUBMENU")
  :
    1
           .
    "X"
      X     (  "-1").
    "Y"
      Y     (  "-1").
    INDEX
          .  -1,    ( ).
    "SUBMENU"
           . INDEX    -1.
  :
    -  X  Y  "-1",        .
    -  X  Y  "-2",        .
    -  X  Y  "-3",        .
    -  X  Y  "-4",        .
    -  X  Y  "-5",      .
    -     INDEX  0,   1  ..

Call("ContextMenu::Show", 2, "X", "Y")
  :
    2
           .
    "X"
      X     (  "-1").
    "Y"
      Y     (  "-1").
  :
    -  X  Y  "-1",        .
    -  X  Y  "-2",        .
    -  X  Y  "-3",        .
    -  X  Y  "-4",        .
    -  X  Y  "-5",      .
    -  X  Y  "-6",   .
